//
//  CheckQueryHeaderView.m
//  PropertyMananger
//
//  Created by bh on 17/3/2.
//  Copyright © 2017年 BH. All rights reserved.
//

#import "CheckQueryHeaderView.h"

@implementation CheckQueryHeaderView

- (id)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.backgroundColor = BHGrayColor;
  
        self.lineViewLeft = [[UILabel alloc]init];
        [self addSubview:self.lineViewLeft];
        
        self.lineViewLeft.backgroundColor = [UIColor grayColor];
        
        [self.lineViewLeft mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self).with.offset(15);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW/2- 100, 0.5));
        }];
        
        self.iconImg = [[UIImageView alloc]init];
        [self addSubview:self.iconImg];
        self.iconImg.image = IMG(@"ico_meter_reading");
        
        [self.iconImg mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.lineViewLeft.mas_trailing).with.offset(10);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(20, 20));
        }];
        
        self.typeLabel = [[UILabel alloc]init];
        [self addSubview:self.typeLabel];
        self.typeLabel.text = @"已抄表";
        
        self.typeLabel.textAlignment = NSTextAlignmentLeft;
        self.typeLabel.font = BHFont(13);
        self.typeLabel.textColor = BHColor(214, 21, 23);
        
        [self.typeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.leading.equalTo(self.iconImg.mas_trailing).with.offset(0);
            make.centerY.equalTo(self.iconImg).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(40, 25));
        }];
        
        self.lineViewRight = [[UILabel alloc]init];
        [self addSubview:self.lineViewRight];
        
        self.lineViewRight.backgroundColor = [UIColor grayColor];
        
        [self.lineViewRight mas_makeConstraints:^(MASConstraintMaker *make) {
            make.trailing.equalTo(self).with.offset(-15);
            make.centerY.equalTo(self).with.offset(0);
            make.size.mas_equalTo(CGSizeMake(BHscreenW/2- 100, 0.5));
        }];

    }
    return self;
}


@end
